Skip to content

earmark_parser: Preserve code span whitespace - #175

Merged
RobertDober merged 2 commits into
RobertDober:masterfrom
garazdawi:master
Nov 9, 2026
Merged

RobertDober merged 2 commits into
RobertDober:masterfrom
garazdawi:master

Conversation

@garazdawi

Copy link
Copy Markdown
Contributor

Earmark adopted full trimming and whitespace collapsing from CommonMark 0.28. CommonMark 0.29 changed the rule because whitespace can be significant in code spans.

Preserve one-sided edge spaces and repeated internal spaces. Normalize line endings to spaces, and remove one edge space only when both edges contain spaces.

I also fixed CI to work for Erlang/OTP 25 tests.

Earmark adopted full trimming and whitespace collapsing from CommonMark
0.28. CommonMark 0.29 changed the rule because whitespace can be
significant in code spans.

Preserve one-sided edge spaces and repeated internal spaces. Normalize
line endings to spaces, and remove one edge space only when both edges
contain spaces.

Assisted-by: Codex:gpt-5
@RobertDober

Copy link
Copy Markdown
Owner

Thank you for your PR.
I am quite busy now but will try to get a look at it this week.

@garazdawi

Copy link
Copy Markdown
Contributor Author

Thanks for you work on Earmark!

There is no rush. It was just something that I noticed when working on elixir-lang/ex_doc#2282 as it causes some inline code spans that are used like that to miss a space.

@RobertDober
RobertDober merged commit aeb61da into RobertDober:master Nov 9, 2026
7 checks passed
@RobertDober

Copy link
Copy Markdown
Owner

Great job Thank You

Do you want a release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants